//
// Created by xkj on 2020/8/31.
//

#ifndef PROJ_ANDROID_TIANHELPER_H
#define PROJ_ANDROID_TIANHELPER_H

#include <string>
#include "BlueToothHelper.h"

USING_NS_CC;


class PosListDetail
{
public:
    void set(Vec2 lt,Vec2 rt,Vec2 lb,Vec2 rb){
        leftTop = lt;
        rightTop = rt;
        leftBottom = lb;
        rightBottom = rb;

    }

    Vec2 leftTop;
    Vec2 rightTop;
    Vec2 leftBottom;
    Vec2 rightBottom;

    Size computRatioOffset()
    {
        Size piexInScreen;//每点在屏幕上的长度

        piexInScreen.width = rightBottom.x - leftTop.x;
        piexInScreen.height = rightBottom.y - leftTop.y;

        return piexInScreen;
    }

    Size computOffset(float dynamicCanvasSide)
    {
        Size piexInScreen;//每点在屏幕上的长度
        float oneX = rightBottom.x - leftBottom.x;
        float oneY = leftBottom.y - leftTop.y;

        piexInScreen.width = dynamicCanvasSide * oneX;
        piexInScreen.height = dynamicCanvasSide * oneY;

        return piexInScreen;
    }
};

class TianHelper
{
public:
     static std::vector<std::string> oneMapping ;//= { "tian-bihua-show-tpl-1-0", "tian-bihua-show-tpl-2-0", "tian-bihua-show-tpl-3-0", "tian-bihua-show-tpl-4-0", "tian-bihua-show-tpl-5-0", "tian-bihua-show-tpl-6-0", "tian-bihua-show-tpl-1-1", "tian-bihua-show-tpl-2-1", "tian-bihua-show-tpl-3-1", "tian-bihua-show-tpl-4-1", "tian-bihua-show-tpl-5-1", "tian-bihua-show-tpl-6-1", "tian-bihua-show-tpl-1-2", "tian-bihua-show-tpl-2-2", "tian-bihua-show-tpl-3-2", "tian-bihua-show-tpl-4-2", "tian-bihua-show-tpl-5-2", "tian-bihua-show-tpl-6-2", "cizu_word_0_1", "cizu_word_1_1", "cizu_word_2_1", "cizu_word_0_2", "cizu_word_1_2", "cizu_word_2_2", "cizu_word_0_3", "cizu_word_1_3", "cizu_word_2_3", "cizu_word_0_4", "cizu_word_1_4", "cizu_word_2_4", "cizu_word_0_5", "cizu_word_1_5", "cizu_word_2_5", "cizu_word_0_6", "cizu_word_1_6", "cizu_word_2_6", "cizu_word_0_7", "cizu_word_1_7", "cizu_word_2_7", "cizu_word_0_8", "cizu_word_1_8", "cizu_word_2_8" };
     static Vec2 offsetPos;

    static bool isContainByPos(const std::string &oneKey,float x,float y) {
            PosListDetail onePos;
            if(BlueToothHelper::connectDeviceType == 1 ||
               BlueToothHelper::connectDeviceType == 3
            ){
                onePos = tianTianNewPosList[oneKey];
            }else{
                onePos = tianHsdPosList[oneKey];
            }

            bool isContian = false;

            if (onePos.leftTop.x < x &&
                onePos.leftTop.y < y &&

                onePos.rightTop.x > x &&
                onePos.rightTop.y < y &&

                onePos.leftBottom.x < x &&
                onePos.leftBottom.y > y &&

                onePos.rightBottom.x > x &&
                onePos.rightBottom.y > y
            ) {
                    isContian = true;
            }

            return isContian;
    }


    static Size GetOffsetRatioById(const std::string &oneKey)
    {
        Size retS;
        if(BlueToothHelper::connectDeviceType == 1 ||
           BlueToothHelper::connectDeviceType == 3
        ){
            retS = tianTianNewPosList[oneKey].computRatioOffset();
        }else{
            retS = tianHsdPosList[oneKey].computRatioOffset();
        }

        return retS;
    }

    static Size GetOffsetById(const std::string &oneKey,float dynamicCanvasSide)
    {
        Size retS;
        if(BlueToothHelper::connectDeviceType == 1 ||
           BlueToothHelper::connectDeviceType == 3
        ){
            retS = tianTianNewPosList[oneKey].computOffset(dynamicCanvasSide);
        }else{
            retS = tianHsdPosList[oneKey].computOffset(dynamicCanvasSide);
        }

        return retS;
    }

    static std::string getPosNameByPos(float x, float y){
             std::string name;
             if(BlueToothHelper::connectDeviceType == 1 ||
                BlueToothHelper::connectDeviceType == 3
             ) {
                 x -= offsetPos.x;
                 y -= offsetPos.y;
             }

            TianHelper::numVecByPoint[TianHelper::numByPoint].x = x;
            TianHelper::numVecByPoint[TianHelper::numByPoint].y = y;
            TianHelper::numByPoint++;
            if(TianHelper::numByPoint >= 4){
                 CCLOG("getPosNameByPos           Vec2(%f,%f),Vec2(%f,%f),Vec2(%f,%f),Vec2(%f,%f)",
                         TianHelper::numVecByPoint[0].x,TianHelper::numVecByPoint[0].y,
                         TianHelper::numVecByPoint[1].x,TianHelper::numVecByPoint[1].y,
                         TianHelper::numVecByPoint[2].x,TianHelper::numVecByPoint[2].y,
                         TianHelper::numVecByPoint[3].x,TianHelper::numVecByPoint[3].y
                 );
                 TianHelper::numByPoint = 0;
            }

             for(const auto oneKey :oneMapping){
                     if(isContainByPos(oneKey,x,y)){
                             name = oneKey;
                             break;
                     }
             }

             return name;
     }

    static PosListDetail& getOneDetailByCanvasId(std::string &oneCanvasId)
    {
        if(BlueToothHelper::connectDeviceType == 1 ||
           BlueToothHelper::connectDeviceType == 3
        ) {
            return TianHelper::tianTianNewPosList[oneCanvasId];
        }else{
            return TianHelper::tianHsdPosList[oneCanvasId];
        }
    }

    static void init() {
        TianHelper::oneMapping = { "tian-bihua-show-tpl-1-0", "tian-bihua-show-tpl-2-0", "tian-bihua-show-tpl-3-0", "tian-bihua-show-tpl-4-0", "tian-bihua-show-tpl-5-0", "tian-bihua-show-tpl-6-0",
                                   "tian-bihua-show-tpl-1-1", "tian-bihua-show-tpl-2-1", "tian-bihua-show-tpl-3-1", "tian-bihua-show-tpl-4-1", "tian-bihua-show-tpl-5-1", "tian-bihua-show-tpl-6-1",
                                   "tian-bihua-show-tpl-1-2", "tian-bihua-show-tpl-2-2", "tian-bihua-show-tpl-3-2", "tian-bihua-show-tpl-4-2", "tian-bihua-show-tpl-5-2", "tian-bihua-show-tpl-6-2",
                                   "cizu_word_0_1", "cizu_word_1_1", "cizu_word_2_1", "cizu_word_0_2", "cizu_word_1_2", "cizu_word_2_2", "cizu_word_0_3", "cizu_word_1_3", "cizu_word_2_3",
                                   "cizu_word_0_4", "cizu_word_1_4", "cizu_word_2_4", "cizu_word_0_5", "cizu_word_1_5", "cizu_word_2_5", "cizu_word_0_6", "cizu_word_1_6", "cizu_word_2_6",
                                   "cizu_word_0_7", "cizu_word_1_7", "cizu_word_2_7", "cizu_word_0_8", "cizu_word_1_8", "cizu_word_2_8"
        };

        TianHelper::tianPosList["tian-bihua-show-tpl-1-0"].set(Vec2(0.2658108108108108, 0.041714285714285704),Vec2(0.38155405405405407, 0.04238095238095238),Vec2(0.2686486486486486, 0.12280952380952379),Vec2(0.3783783783783784, 0.12223809523809523));
        TianHelper::tianPosList["tian-bihua-show-tpl-2-0"].set(Vec2(0.3737837837837838, 0.0430952380952381),Vec2(0.4894594594594594, 0.04214285714285715),Vec2(0.3752027027027027, 0.12419047619047621),Vec2(0.4885135135135135, 0.12447619047619049));
        TianHelper::tianPosList["tian-bihua-show-tpl-3-0"].set(Vec2(0.483445945945946, 0.04128571428571429),Vec2(0.5947972972972972, 0.04185714285714287),Vec2(0.4826351351351352, 0.12657142857142858),Vec2(0.5947297297297298, 0.12514285714285714));
        TianHelper::tianPosList["tian-bihua-show-tpl-4-0"].set(Vec2(0.5878378378378379, 0.04128571428571429),Vec2(0.7000675675675676, 0.04033333333333333),Vec2(0.5883108108108108, 0.12466666666666668),Vec2(0.7000675675675676, 0.12300000000000003));
        TianHelper::tianPosList["tian-bihua-show-tpl-5-0"].set(Vec2(0.6924324324324325, 0.04223809523809524),Vec2(0.804391891891892, 0.042190476190476195),Vec2(0.6945945945945946, 0.12290476190476188),Vec2(0.8081081081081081, 0.1252857142857143));
        TianHelper::tianPosList["tian-bihua-show-tpl-6-0"].set(Vec2(0.8028378378378378, 0.037380952380952376),Vec2(0.9135135135135135, 0.036000000000000004),Vec2(0.8007432432432433, 0.11976190476190476),Vec2(0.9087162162162161, 0.1182857142857143));
        TianHelper::tianPosList["tian-bihua-show-tpl-1-1"].set(Vec2(0.2685135135135135, 0.18566666666666667),Vec2(0.3868918918918919, 0.18380952380952384),Vec2(0.26878378378378376, 0.27342857142857147),Vec2(0.3856756756756756, 0.2693809523809524));
        TianHelper::tianPosList["tian-bihua-show-tpl-2-1"].set(Vec2(0.37006756756756753, 0.1873809523809524),Vec2(0.4982432432432432, 0.18185714285714286),Vec2(0.37391891891891893, 0.27161904761904765),Vec2(0.4960135135135135, 0.27109523809523806));
        TianHelper::tianPosList["tian-bihua-show-tpl-3-1"].set(Vec2(0.48249999999999993, 0.18680952380952384),Vec2(0.5974999999999999, 0.1845238095238095),Vec2(0.4798648648648648, 0.2697142857142857),Vec2(0.5972972972972973, 0.26857142857142857));
        TianHelper::tianPosList["tian-bihua-show-tpl-4-1"].set(Vec2(0.5898648648648648, 0.19090476190476194),Vec2(0.7153378378378378, 0.18466666666666667),Vec2(0.5902702702702702, 0.27776190476190477),Vec2(0.7101351351351352, 0.27414285714285713));
        TianHelper::tianPosList["tian-bihua-show-tpl-5-1"].set(Vec2(0.6945945945945946, 0.1870952380952381),Vec2(0.8072972972972973, 0.18657142857142855),Vec2(0.6971621621621621, 0.2654761904761905),Vec2(0.8061486486486487, 0.26857142857142857));
        TianHelper::tianPosList["tian-bihua-show-tpl-6-1"].set(Vec2(0.8030405405405405, 0.18804761904761905),Vec2(0.926554054054054, 0.1842857142857143),Vec2(0.8024324324324325, 0.27309523809523806),Vec2(0.9233783783783783, 0.27));
        TianHelper::tianPosList["tian-bihua-show-tpl-1-2"].set(Vec2(0.26, 0.32457142857142857),Vec2(0.3835135135135135, 0.3241428571428572),Vec2(0.26439189189189194, 0.41123809523809524),Vec2(0.38202702702702707, 0.41152380952380957));
        TianHelper::tianPosList["tian-bihua-show-tpl-2-2"].set(Vec2(0.36979729729729727, 0.32252380952380955),Vec2(0.49432432432432427, 0.32047619047619047),Vec2(0.37540540540540546, 0.4061428571428572),Vec2(0.49087837837837833, 0.40690476190476194));
        TianHelper::tianPosList["tian-bihua-show-tpl-3-2"].set(Vec2(0.4745945945945945, 0.32357142857142857),Vec2(0.6037837837837837, 0.3210476190476191),Vec2(0.4810135135135135, 0.41252380952380957),Vec2(0.5961486486486486, 0.41204761904761905));
        TianHelper::tianPosList["tian-bihua-show-tpl-4-2"].set(Vec2(0.5790540540540541, 0.32276190476190475),Vec2(0.705, 0.31923809523809527),Vec2(0.580945945945946, 0.4124761904761905),Vec2(0.6984459459459459, 0.4093333333333334));
        TianHelper::tianPosList["tian-bihua-show-tpl-5-2"].set(Vec2(0.6895945945945946, 0.32352380952380955),Vec2(0.812027027027027, 0.32057142857142856),Vec2(0.6928378378378378, 0.4067619047619048),Vec2(0.8117567567567567, 0.40723809523809523));
        TianHelper::tianPosList["tian-bihua-show-tpl-6-2"].set(Vec2(0.7897297297297297, 0.3248095238095238),Vec2(0.9112162162162162, 0.32085714285714284),Vec2(0.7918243243243243, 0.4082857142857143),Vec2(0.914527027027027, 0.4040952380952381));
        TianHelper::tianPosList["cizu_word_0_1"].set(Vec2(0.0029729729729729704, 0.4474761904761904),Vec2(0.1133108108108108, 0.4487142857142857),Vec2(-0.003581081081081086, 0.5320952380952382),Vec2(0.11614864864864864, 0.5344285714285715));
        TianHelper::tianPosList["cizu_word_1_1"].set(Vec2(0.009594594594594594, 0.5660476190476191),Vec2(0.10891891891891892, 0.5663809523809524),Vec2(0.008175675675675675, 0.6403333333333334),Vec2(0.10905405405405405, 0.6397619047619048));
        TianHelper::tianPosList["cizu_word_2_1"].set(Vec2(0.012905405405405412, 0.6869047619047619),Vec2(0.1118918918918919, 0.6856666666666666),Vec2(0.012905405405405412, 0.7556666666666666),Vec2(0.11574324324324324, 0.7587619047619047));
        TianHelper::tianPosList["cizu_word_0_2"].set(Vec2(0.10770270270270271, 0.45176190476190475),Vec2(0.2256756756756757, 0.45142857142857146),Vec2(0.10614864864864865, 0.5325238095238096),Vec2(0.2252702702702703, 0.5307142857142857));
        TianHelper::tianPosList["cizu_word_1_2"].set(Vec2(0.10722972972972973, 0.5641904761904762),Vec2(0.22499999999999998, 0.5648571428571428),Vec2(0.11155405405405407, 0.6473809523809524),Vec2(0.2268243243243243, 0.6443333333333333));
        TianHelper::tianPosList["cizu_word_2_2"].set(Vec2(0.11493243243243244, 0.6856666666666666),Vec2(0.2219594594594595, 0.6845238095238095),Vec2(0.11486486486486487, 0.7589047619047619),Vec2(0.22222972972972976, 0.7586190476190476));
        TianHelper::tianPosList["cizu_word_0_3"].set(Vec2(0.23385135135135138, 0.4500476190476191),Vec2(0.34202702702702703, 0.4505238095238095),Vec2(0.23641891891891892, 0.5332857142857144),Vec2(0.3435810810810811, 0.5344285714285715));
        TianHelper::tianPosList["cizu_word_1_3"].set(Vec2(0.23851351351351352, 0.5643809523809524),Vec2(0.33655405405405403, 0.5652857142857143),Vec2(0.23939189189189192, 0.6379523809523809),Vec2(0.33783783783783783, 0.6393333333333334));
        TianHelper::tianPosList["cizu_word_2_3"].set(Vec2(0.2445945945945946, 0.6857142857142857),Vec2(0.3439864864864865, 0.6858095238095238),Vec2(0.24412162162162165, 0.7569523809523809),Vec2(0.34351351351351356, 0.7562380952380953));
        TianHelper::tianPosList["cizu_word_0_4"].set(Vec2(0.33425675675675676, 0.4488095238095238),Vec2(0.45256756756756755, 0.448),Vec2(0.3319594594594595, 0.5318571428571428),Vec2(0.4514864864864865, 0.532));
        TianHelper::tianPosList["cizu_word_1_4"].set(Vec2(0.3377027027027027, 0.5651428571428572),Vec2(0.4443918918918919, 0.5654285714285715),Vec2(0.33574324324324323, 0.6398571428571429),Vec2(0.4477702702702703, 0.641));
        TianHelper::tianPosList["cizu_word_2_4"].set(Vec2(0.34121621621621623, 0.6847619047619047),Vec2(0.4495945945945946, 0.6856190476190476),Vec2(0.34351351351351356, 0.7564285714285715),Vec2(0.45236486486486494, 0.7577142857142857));
        TianHelper::tianPosList["cizu_word_0_5"].set(Vec2(0.46364864864864863, 0.4466666666666667),Vec2(0.5725675675675675, 0.4466666666666667),Vec2(0.4645270270270271, 0.5293333333333334),Vec2(0.5741216216216216, 0.5283333333333333));
        TianHelper::tianPosList["cizu_word_1_5"].set(Vec2(0.46885135135135136, 0.5652380952380953),Vec2(0.5728378378378378, 0.5652857142857143),Vec2(0.4690540540540541, 0.6405238095238096),Vec2(0.5741891891891892, 0.6401428571428572));
        TianHelper::tianPosList["cizu_word_2_5"].set(Vec2(0.4745270270270271, 0.6868095238095238),Vec2(0.5781081081081081, 0.6870952380952381),Vec2(0.47168918918918923, 0.7584761904761904),Vec2(0.5768243243243244, 0.7603333333333333));
        TianHelper::tianPosList["cizu_word_0_6"].set(Vec2(0.5692567567567568, 0.44957142857142857),Vec2(0.6824324324324325, 0.45042857142857146),Vec2(0.5678378378378378, 0.5312380952380953),Vec2(0.682027027027027, 0.5325238095238096));
        TianHelper::tianPosList["cizu_word_1_6"].set(Vec2(0.5729054054054054, 0.564857142857143),Vec2(0.6771621621621622, 0.5646666666666667),Vec2(0.5731081081081081, 0.6390476190476191),Vec2(0.6781081081081081, 0.6416190476190476));
        TianHelper::tianPosList["cizu_word_2_6"].set(Vec2(0.5785135135135135, 0.6809047619047619),Vec2(0.6800675675675676, 0.6814285714285714),Vec2(0.5783108108108108, 0.7528571428571428),Vec2(0.6812162162162162, 0.7527142857142857));
        TianHelper::tianPosList["cizu_word_0_7"].set(Vec2(0.6918918918918919, 0.45042857142857146),Vec2(0.8087162162162163, 0.4498095238095238),Vec2(0.6918918918918919, 0.5300476190476191),Vec2(0.8090540540540541, 0.5297142857142858));
        TianHelper::tianPosList["cizu_word_1_7"].set(Vec2(0.7031756756756756, 0.5666666666666667),Vec2(0.8041216216216216, 0.5683809523809524),Vec2(0.7033108108108108, 0.6411428571428572),Vec2(0.8071621621621622, 0.6402857142857143));
        TianHelper::tianPosList["cizu_word_2_7"].set(Vec2(0.7044594594594594, 0.6814285714285714),Vec2(0.8085810810810811, 0.6825238095238095),Vec2(0.7024324324324325, 0.7554761904761904),Vec2(0.8101351351351351, 0.755047619047619));
        TianHelper::tianPosList["cizu_word_0_8"].set(Vec2(0.8008108108108108, 0.4463333333333333),Vec2(0.9208108108108108, 0.4486666666666667),Vec2(0.7991891891891892, 0.5336666666666667),Vec2(0.9183108108108108, 0.5290952380952381));
        TianHelper::tianPosList["cizu_word_1_8"].set(Vec2(0.8095945945945946, 0.5664285714285715),Vec2(0.9161486486486486, 0.565952380952381),Vec2(0.8103378378378379, 0.6421904761904762),Vec2(0.9151351351351351, 0.6418571428571429));
        TianHelper::tianPosList["cizu_word_2_8"].set(Vec2(0.8085810810810811, 0.6846666666666666),Vec2(0.9128378378378379, 0.6835238095238095),Vec2(0.8114864864864865, 0.7572857142857143),Vec2(0.9177027027027027, 0.7556666666666667));

        TianHelper::tianHsdPosList["tian-bihua-show-tpl-1-0"].set(Vec2(0.25,0.1705808),Vec2(0.32517856,0.17032829),Vec2(0.24803571,0.22222222),Vec2(0.3275,0.22260101));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-2-0"].set(Vec2(0.32607144,0.1705808) , Vec2(0.40107143,0.17020202), Vec2(0.325,0.22272727), Vec2(0.40017858,0.22146465));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-3-0"].set(Vec2(0.40089285,0.17032829) ,Vec2(0.47553572,0.16982323) , Vec2(0.39946428,0.22310606), Vec2(0.475,0.22260101));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-4-0"].set(Vec2(0.47464284,0.16919191) ,Vec2(0.55125,0.17007576) ,  Vec2(0.47428572,0.22323233), Vec2(0.5510714,0.22209597));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-5-0"].set(Vec2(0.5507143,0.17045455) , Vec2(0.6191071,0.17032829), Vec2(0.55,0.22209597)  , Vec2(0.62642854,0.22146465));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-6-0"].set(Vec2(0.6242857,0.1699495) ,Vec2(0.7014286,0.16868687) ,Vec2(0.625,0.22626263) ,Vec2(0.70357144,0.225));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-1-1"].set(Vec2(0.24857143,0.27032828) ,Vec2(0.32642856,0.27146465) ,Vec2(0.24928571,0.32222223) , Vec2(0.32625,0.325));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-2-1"].set(Vec2(0.32428572,0.27121213) ,Vec2(0.40089285,0.27133837) ,Vec2(0.3244643,0.3243687) , Vec2(0.40089285,0.32348484));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-3-1"].set(Vec2(0.39946428,0.27070707) ,Vec2(0.47553572,0.2709596) ,Vec2(0.4,0.3233586) ,Vec2(0.475,0.32310605));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-4-1"].set(Vec2(0.47410715,0.26969698) ,Vec2(0.55089283,0.27083334) ,Vec2(0.47339284,0.32285354) ,Vec2(0.5517857,0.3233586));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-5-1"].set(Vec2(0.55,0.27045456) ,Vec2(0.625,0.27108586) ,Vec2(0.54982144,0.3236111) ,Vec2(0.62785715,0.32373738));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-6-1"].set(Vec2(0.62607145,0.2705808) ,Vec2(0.70214283,0.27146465) ,Vec2(0.62607145,0.3236111) ,Vec2(0.70107144,0.32449496));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-1-2"].set(Vec2(0.24696429,0.37007576) ,Vec2(0.32464287,0.37184343) ,Vec2(0.24875,0.42184344) ,Vec2(0.32589287,0.4229798));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-2-2"].set(Vec2(0.3232143,0.37121212) ,Vec2(0.40142858,0.3709596) ,Vec2(0.3244643,0.42310607) ,Vec2(0.4030357,0.42323232) );
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-3-2"].set(Vec2(0.39839286,0.37146464) ,Vec2(0.47375,0.37171718) , Vec2(0.39910713,0.42487374) ,Vec2(0.47732142,0.4239899) );
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-4-2"].set(Vec2(0.47303572,0.37108585) ,Vec2(0.5510714,0.3719697) , Vec2(0.4732143,0.4233586) ,Vec2(0.5525,0.42462122) );
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-5-2"].set(Vec2(0.55,0.3713384) ,Vec2(0.6269643,0.37146464) ,Vec2(0.5494643,0.42348486) , Vec2(0.6269643,0.42373738));
        TianHelper::tianHsdPosList["tian-bihua-show-tpl-6-2"].set(Vec2(0.62464285,0.37108585) ,Vec2(0.7025,0.37058082) ,Vec2(0.62464285,0.425) ,Vec2(0.70160717,0.425));
        TianHelper::tianHsdPosList["cizu_word_0_1"].set(Vec2(0.058035713,0.45606062) ,Vec2(0.13339286,0.45593435) ,Vec2(0.058214284,0.50934345) ,Vec2(0.13392857,0.5082071) );
        TianHelper::tianHsdPosList["cizu_word_1_1"].set(Vec2(0.056607142,0.53712124) ,Vec2(0.13410714,0.5377525) ,Vec2(0.05625,0.5911616) ,Vec2(0.13446428,0.5919192) );
        TianHelper::tianHsdPosList["cizu_word_2_1"].set(Vec2(0.057142857,0.6179293) ,Vec2(0.13535714,0.6185606) ,Vec2(0.05625,0.6729798) ,Vec2(0.135,0.6728535) );
        TianHelper::tianHsdPosList["cizu_word_0_2"].set(Vec2(0.13232143,0.4564394) ,Vec2(0.20928572,0.4570707),Vec2(0.13303572,0.5099747),Vec2(0.20964286,0.51060605));
        TianHelper::tianHsdPosList["cizu_word_1_2"].set(Vec2(0.13232143,0.53674245) ,Vec2(0.2075,0.53838384) ,Vec2(0.13178572,0.5915404) ,Vec2(0.21,0.5911616));
        TianHelper::tianHsdPosList["cizu_word_2_2"].set(Vec2(0.13196428,0.61843437) ,Vec2(0.20821428,0.619697) ,Vec2(0.13267857,0.67108583) ,Vec2(0.21,0.67171717) );
        TianHelper::tianHsdPosList["cizu_word_0_3"].set(Vec2(0.22071429,0.45782828) ,Vec2(0.2994643,0.4568182) ,Vec2(0.22053571,0.50972223) ,Vec2(0.2994643,0.5117424));
        TianHelper::tianHsdPosList["cizu_word_1_3"].set(Vec2(0.21178572,0.5318182) ,Vec2(0.2982143,0.5378788) ,Vec2(0.22196428,0.5919192) ,Vec2(0.2980357,0.59179294) );
        TianHelper::tianHsdPosList["cizu_word_2_3"].set(Vec2(0.22089286,0.6185606) ,Vec2(0.29982144,0.6179293) ,Vec2(0.22035715,0.6736111) ,Vec2(0.2994643,0.67424244));
        TianHelper::tianHsdPosList["cizu_word_0_4"].set(Vec2(0.29660714,0.45580807) ,Vec2(0.37142858,0.4574495) , Vec2(0.29660714,0.5103535) ,Vec2(0.37428573,0.5094697) );
        TianHelper::tianHsdPosList["cizu_word_1_4"].set(Vec2(0.29714286,0.53800505) , Vec2(0.37303573,0.5382576) ,Vec2(0.29589286,0.59002525) , Vec2(0.37357143,0.59179294) );
        TianHelper::tianHsdPosList["cizu_word_2_4"].set(Vec2(0.2967857,0.6189394) ,Vec2(0.37607142,0.6185606) ,Vec2(0.2967857,0.6739899),Vec2(0.37535715,0.67247474) );
        TianHelper::tianHsdPosList["cizu_word_0_5"].set(Vec2(0.38625,0.45606062) ,Vec2(0.46267858,0.4574495) ,Vec2(0.3844643,0.5114899) ,Vec2(0.46357143,0.51022726) );
        TianHelper::tianHsdPosList["cizu_word_1_5"].set(Vec2(0.38535714,0.5372475) ,Vec2(0.46339285,0.5364899) ,Vec2(0.3844643,0.59090906) ,Vec2(0.465,0.5920454) );
        TianHelper::tianHsdPosList["cizu_word_2_5"].set(Vec2(0.38589287,0.61868685) ,Vec2(0.46375,0.61906564) ,Vec2(0.38625,0.6728535) ,Vec2(0.46482143,0.6729798));
        TianHelper::tianHsdPosList["cizu_word_0_6"].set(Vec2(0.46071428,0.4574495) ,Vec2(0.5369643,0.4568182) ,Vec2(0.46,0.5104798) ,Vec2(0.5394643,0.51111114) );
        TianHelper::tianHsdPosList["cizu_word_1_6"].set(Vec2(0.45964286,0.53838384) ,Vec2(0.5371429,0.5385101) ,Vec2(0.46071428,0.59141415) ,Vec2(0.53839284,0.5907828) );
        TianHelper::tianHsdPosList["cizu_word_2_6"].set(Vec2(0.46035713,0.61957073) ,Vec2(0.53839284,0.61881316) , Vec2(0.46142858,0.6729798),Vec2(0.53660715,0.67373735) );
        TianHelper::tianHsdPosList["cizu_word_0_7"].set(Vec2(0.55035716,0.45820707) ,Vec2(0.6276786,0.4568182) ,Vec2(0.55035716,0.5094697) , Vec2(0.6269643,0.5099747) );
        TianHelper::tianHsdPosList["cizu_word_1_7"].set(Vec2(0.5494643,0.5381313) ,Vec2(0.6269643,0.5375) ,Vec2(0.54964286,0.5911616) ,Vec2(0.6275,0.59128785) );
        TianHelper::tianHsdPosList["cizu_word_2_7"].set(Vec2(0.54910713,0.6185606) ,Vec2(0.62785715,0.61830807) ,Vec2(0.55035716,0.6729798) ,Vec2(0.6275,0.6731061) );
        TianHelper::tianHsdPosList["cizu_word_0_8"].set(Vec2(0.6241071,0.4540404) ,Vec2(0.7025,0.45429292) ,Vec2(0.6241071,0.5117424)  ,Vec2(0.70125,0.5113636) );
        TianHelper::tianHsdPosList["cizu_word_1_8"].set(Vec2(0.62375,0.5368687) ,Vec2(0.70285714,0.53800505) , Vec2(0.6242857,0.5911616) ,Vec2(0.70160717,0.5920454) );
        TianHelper::tianHsdPosList["cizu_word_2_8"].set(Vec2(0.62375,0.61944443) ,Vec2(0.7030357,0.6189394) ,Vec2(0.6241071,0.6732323) ,Vec2(0.70446426,0.6729798) );

        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-1-0"].set(Vec2(0.256689,0.043524),Vec2(0.359730,0.045048),Vec2(0.253108,0.116048),Vec2(0.358243,0.117952));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-2-0"].set(Vec2(0.350000,0.047095),Vec2(0.469257,0.043810),Vec2(0.352905,0.125286),Vec2(0.465135,0.123667));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-3-0"].set(Vec2(0.457635,0.045714),Vec2(0.562838,0.044190),Vec2(0.457027,0.123381),Vec2(0.563581,0.122952));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-4-0"].set(Vec2(0.560068,0.049429),Vec2(0.666487,0.048095),Vec2(0.556824,0.126714),Vec2(0.667297,0.125429));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-5-0"].set(Vec2(0.663176,0.049476),Vec2(0.767635,0.047952),Vec2(0.663311,0.126619),Vec2(0.766216,0.128952));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-6-0"].set(Vec2(0.760946,0.051524),Vec2(0.864662,0.050476),Vec2(0.759797,0.128000),Vec2(0.862838,0.126571));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-1-1"].set(Vec2(0.250811,0.183571),Vec2(0.357162,0.185714),Vec2(0.251216,0.262381),Vec2(0.354730,0.263762));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-2-1"].set(Vec2(0.353919,0.185381),Vec2(0.461351,0.184476),Vec2(0.352500,0.258667),Vec2(0.461013,0.263810));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-3-1"].set(Vec2(0.454527,0.182571),Vec2(0.560068,0.183571),Vec2(0.453919,0.263571),Vec2(0.557770,0.266429));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-4-1"].set(Vec2(0.557230,0.187952),Vec2(0.664662,0.187476),Vec2(0.555473,0.262524),Vec2(0.662703,0.264667));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-5-1"].set(Vec2(0.659054,0.186762),Vec2(0.764392,0.186524),Vec2(0.659797,0.260714),Vec2(0.762365,0.261714));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-6-1"].set(Vec2(0.762703,0.186238),Vec2(0.863514,0.183429),Vec2(0.761419,0.261762),Vec2(0.860878,0.260190));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-1-2"].set(Vec2(0.253446,0.318429),Vec2(0.356554,0.318667),Vec2(0.250405,0.397857),Vec2(0.356284,0.398143));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-2-2"].set(Vec2(0.348784,0.317000),Vec2(0.459730,0.316238),Vec2(0.350811,0.393810),Vec2(0.458649,0.397000));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-3-2"].set(Vec2(0.455338,0.320857),Vec2(0.557365,0.321905),Vec2(0.454054,0.396667),Vec2(0.558514,0.398048));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-4-2"].set(Vec2(0.554459,0.321524),Vec2(0.661487,0.321857),Vec2(0.555743,0.400048),Vec2(0.657973,0.400048));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-5-2"].set(Vec2(0.659527,0.321238),Vec2(0.764797,0.323143),Vec2(0.656892,0.399048),Vec2(0.762770,0.400191));
        TianHelper::tianTianNewPosList["tian-bihua-show-tpl-6-2"].set(Vec2(0.764324,0.321905),Vec2(0.861622,0.324524),Vec2(0.761284,0.400238),Vec2(0.859122,0.399810));
        TianHelper::tianTianNewPosList["cizu_word_0_1"].set(Vec2(-0.007500,0.434238),Vec2(0.095541,0.435238),Vec2(-0.009865,0.508667),Vec2(0.092027,0.510286));
        TianHelper::tianTianNewPosList["cizu_word_1_1"].set(Vec2(-0.009392,0.547762),Vec2(0.090676,0.547000),Vec2(-0.011216,0.621524),Vec2(0.090068,0.621714));
        TianHelper::tianTianNewPosList["cizu_word_2_1"].set(Vec2(-0.011419,0.658905),Vec2(0.089122,0.658048),Vec2(-0.012703,0.731571),Vec2(0.088311,0.733286));
        TianHelper::tianTianNewPosList["cizu_word_0_2"].set(Vec2(0.089054,0.434190),Vec2(0.196014,0.437191),Vec2(0.087500,0.511095),Vec2(0.195338,0.510476));
        TianHelper::tianTianNewPosList["cizu_word_1_2"].set(Vec2(0.090270,0.547619),Vec2(0.195946,0.550524),Vec2(0.088784,0.623905),Vec2(0.195743,0.622714));
        TianHelper::tianTianNewPosList["cizu_word_2_2"].set(Vec2(0.085000,0.659476),Vec2(0.190946,0.660524),Vec2(0.085135,0.736095),Vec2(0.191757,0.734381));
        TianHelper::tianTianNewPosList["cizu_word_0_3"].set(Vec2(0.211419,0.438524),Vec2(0.315203,0.438571),Vec2(0.212162,0.513810),Vec2(0.313784,0.515810));
        TianHelper::tianTianNewPosList["cizu_word_1_3"].set(Vec2(0.209459,0.549476),Vec2(0.312432,0.552048),Vec2(0.208716,0.624143),Vec2(0.310811,0.625905));
        TianHelper::tianTianNewPosList["cizu_word_2_3"].set(Vec2(0.206081,0.658048),Vec2(0.310405,0.659667),Vec2(0.205541,0.737381),Vec2(0.307027,0.736190));
        TianHelper::tianTianNewPosList["cizu_word_0_4"].set(Vec2(0.311014,0.439190),Vec2(0.421149,0.441333),Vec2(0.310811,0.516714),Vec2(0.416487,0.517762));
        TianHelper::tianTianNewPosList["cizu_word_1_4"].set(Vec2(0.306149,0.550286),Vec2(0.416081,0.550048),Vec2(0.306081,0.626238),Vec2(0.410541,0.624714));
        TianHelper::tianTianNewPosList["cizu_word_2_4"].set(Vec2(0.302703,0.660095),Vec2(0.409324,0.663476),Vec2(0.303243,0.737952),Vec2(0.407230,0.740238));
        TianHelper::tianTianNewPosList["cizu_word_0_5"].set(Vec2(0.434865,0.440476),Vec2(0.539392,0.440190),Vec2(0.435473,0.517714),Vec2(0.542095,0.519000));
        TianHelper::tianTianNewPosList["cizu_word_1_5"].set(Vec2(0.431689,0.552476),Vec2(0.538784,0.551571),Vec2(0.430270,0.627619),Vec2(0.532635,0.626952));
        TianHelper::tianTianNewPosList["cizu_word_2_5"].set(Vec2(0.428243,0.661857),Vec2(0.537703,0.660381),Vec2(0.428851,0.742524),Vec2(0.533716,0.743762));
        TianHelper::tianTianNewPosList["cizu_word_0_6"].set(Vec2(0.536487,0.441333),Vec2(0.643311,0.441524),Vec2(0.537230,0.519095),Vec2(0.640608,0.519667));
        TianHelper::tianTianNewPosList["cizu_word_1_6"].set(Vec2(0.535338,0.551667),Vec2(0.637905,0.553524),Vec2(0.528041,0.631048),Vec2(0.638243,0.629476));
        TianHelper::tianTianNewPosList["cizu_word_2_6"].set(Vec2(0.530541,0.660905),Vec2(0.640203,0.662286),Vec2(0.529932,0.739714),Vec2(0.636892,0.739619));
        TianHelper::tianTianNewPosList["cizu_word_0_7"].set(Vec2(0.658378,0.442524),Vec2(0.767095,0.443238),Vec2(0.656959,0.518238),Vec2(0.764324,0.519429));
        TianHelper::tianTianNewPosList["cizu_word_1_7"].set(Vec2(0.657365,0.554238),Vec2(0.762905,0.554000),Vec2(0.655338,0.632000),Vec2(0.761689,0.630810));
        TianHelper::tianTianNewPosList["cizu_word_2_7"].set(Vec2(0.653987,0.665381),Vec2(0.761284,0.663571),Vec2(0.653513,0.743619),Vec2(0.761149,0.742381));
        TianHelper::tianTianNewPosList["cizu_word_0_8"].set(Vec2(0.760338,0.442190),Vec2(0.863649,0.441286),Vec2(0.758649,0.519667),Vec2(0.859865,0.520143));
        TianHelper::tianTianNewPosList["cizu_word_1_8"].set(Vec2(0.759324,0.553143),Vec2(0.861757,0.553667),Vec2(0.758649,0.630476),Vec2(0.857973,0.631000));
        TianHelper::tianTianNewPosList["cizu_word_2_8"].set(Vec2(0.755405,0.664048),Vec2(0.861149,0.661762),Vec2(0.756149,0.741667),Vec2(0.857973,0.740333));
    }

private:
    static std::map <std::string, PosListDetail> tianPosList;
    static std::map <std::string, PosListDetail> tianHsdPosList;
    static std::map <std::string, PosListDetail> tianTianNewPosList;
    static std::array<Vec2,4> numVecByPoint;
    static int numByPoint;
};

#endif //PROJ_ANDROID_TIANHELPER_H
